#include<fstream>
using namespace std;
int main(){
	ifstream in;
	in.open("c:\\ls\\data2.txt"); 
	char a[100],b[100];
	int j=0;
	for(int i=0;i!='\0';i++){//a[i]!='\0'而不是i!='\0'
		in>>a[i];
		if((a[i]>'a'&&a[i]<'z')||(a[i]>'A'&&a[i]<'Z'))
		  b[j++] = a[i];
	}
	b[j] = '\0';
	in.close();
	ofstream out;
	out.open("c:\\ls\\data2.txt");
	for(int i=0;i!='\0';i++)
	    out<<b[j];//这里该用i而不是j
	out.close();
	return 0;
}
